import http from '/src/utils/request'

export function getCollects(current,size,userId) {
  return http.get(`/plugins/baliServer-module-article/api/collection?current=${current}&size=${size}&userId=${userId}`)
}

export function isCollect(itemId) {
  return http.get(`/plugins/baliServer-module-article/api/collection?current=1&size=1&targetId=${itemId}`)
}

export function doCollect(body) {
  return http.post('/plugins/baliServer-module-article/api/collection',body)
}

export function doUnCollect(itemId) {
  return http.delete(`/plugins/baliServer-module-article/api/collection/${itemId}`)
}
